package com.example.animation0415;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    private Button btn_frame;
    private Button btn_attribute;
    private Button btn_tween;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView(){
        btn_frame = findViewById(R.id.btn_frame);
        btn_attribute = findViewById(R.id.btn_attribute);
        btn_tween = findViewById(R.id.btn_tween);

        btn_frame.setOnClickListener(this);
        btn_attribute.setOnClickListener(this);
        btn_tween.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch (v.getId()){
            case R.id.btn_frame:
                intent = new Intent();
                intent.setClass(MainActivity.this,FrameActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_tween:
                intent = new Intent();
                intent.setClass(MainActivity.this,TweenActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_attribute:
                intent = new Intent();
                intent.setClass(MainActivity.this,AttributeActivity.class);
                startActivity(intent);
                break;

        }
    }
}